package com.credithc.signature.manager.config.feign;

import feign.Request;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @desc: <br/>
 * @author: Jingbo Hu<br/>
 * @time：2021年06⽉30⽇<br/>
 * @version：v1.0.0<br>
 */
@Configuration
public class FeignConfiguration {

    @Value("${service.feign.connectTimeout:600000}")
    private int connectTimeout;

    @Value("${service.feign.readTimeOut:600000}")
    private int readTimeout;

    @Bean
    public Request.Options options() {
        return new Request.Options(connectTimeout, readTimeout);
    }
}
